package com.example.log;

import java.lang.reflect.Method;

import org.springframework.aop.AfterReturningAdvice;
// 方式1 使用原生spring API实现
public class LogAfter implements AfterReturningAdvice{

    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {

        System.out.println(target.getClass().getName() + 
                            " 的 " + method.getName() + 
                            "被执行了.返回了:"  + returnValue);
    }
    
}
